import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { ApiService } from '../../../../providers/ApiPro.service';


@Component({
  selector: 'app-setUserInfo',
  templateUrl: './setUserInfo.component.html',
  styleUrls: ['./setUserInfo.component.scss']
})
export class SetUserInfoComponent implements OnInit {
    public data: any;

  constructor(
    public apiService: ApiService,
    private route: ActivatedRoute
  ) { }

  ngOnInit() {
        this.getId();
  }
  
  getId(){
     this.route.params.subscribe((params) => {
            this.load(params['id']);
        });
  }

    load(id){
    let url = "finduserdetail"
    this.apiService.get(url,{"userId":id})
      .then(res =>{
        console.log(res);
        this.data = res.result;
      })
  }

}
